home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNU_C++ / LIB / GEMLIB38.LZH / include / gem.h next >
Encoding:
C/C++ Source or Header  |  1998-11-10  |  35.2 KB  |  1,275 lines

  1. /*
  2.  * gem.h - main header file for new gem-lib
  3.  */
  4. #ifndef _GEMLIB_H_
  5. #define _GEMLIB_H_
  6.  
  7. #include <compiler.h>
  8.  
  9.  
  10. #ifdef __GEMLIB_OLDBIND            /* Backward-compatibility */
  11. #undef _GEMLIB_H_                    /* For old bindings, these header had to be multi-included. */
  12.  
  13. #ifndef __GEMLIB_HAVE_DEFS        /* first include via aesbind/vdibind/gemfast */
  14. #define __GEMLIB_HAVE_DEFS
  15. #else
  16. #undef __GEMLIB_DEFS
  17. #endif
  18.  
  19. #else                                    /* New include scheme: one header defines all */
  20. #define __GEMLIB_DEFS
  21. #define __GEMLIB_AES
  22. #define __GEMLIB_VDI
  23. #endif
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28.  
  29.  
  30. /*******************************************************************************
  31.  * The version of the gem-lib
  32.  */
  33. #define GEMLIB_PATCHLEVEL    "38"
  34.  
  35.  
  36.  
  37. #ifdef __GEMLIB_DEFS
  38.  
  39. /*******************************************************************************
  40.  * The AES specific stuff from old gemfast.h
  41.  */
  42.  
  43. #define NIL                 0
  44. #define DESKTOP_HANDLE    0
  45. #define DESK                  DESKTOP_HANDLE
  46.  
  47.         /* appl_getinfo modes */
  48. #define AES_LARGEFONT    0
  49. #define AES_SMALLFONT    1
  50. #define AES_SYSTEM        2
  51. #define AES_LANGUAGE     3
  52. #define AES_PROCESS        4
  53. #define AES_PCGEM         5
  54. #define AES_INQUIRE        6
  55. #define AES_MOUSE         8
  56. #define AES_MENU            9
  57. #define AES_SHELL       10
  58. #define AES_WINDOW      11
  59.  
  60.         /* appl_getinfo return values */
  61. #define SYSTEM_FONT        0
  62. #define OUTLINE_FONT     1
  63.  
  64. #define AESLANG_ENGLISH 0
  65. #define AESLANG_GERMAN    1
  66. #define AESLANG_FRENCH    2
  67. #define AESLANG_SPANISH 4
  68. #define AESLANG_ITALIAN 5
  69. #define AESLANG_SWEDISH 6
  70.  
  71.         /* appl_read modes */
  72. #define APR_NOWAIT      -1
  73.  
  74.         /* appl_search modes */
  75. #define APP_FIRST         0
  76. #define APP_NEXT            1
  77.  
  78.         /* appl_search return values*/
  79. #define APP_SYSTEM        0x01
  80. #define APP_APPLICATION 0x02
  81. #define APP_ACCESSORY    0x04
  82. #define APP_SHELL         0x08
  83.  
  84.         /* appl_trecord types */
  85. #define APPEVNT_TIMER     0
  86. #define APPEVNT_BUTTON     1
  87. #define APPEVNT_MOUSE     2
  88. #define APPEVNT_KEYBOARD 3
  89.  
  90.         /* struct used by appl_trecord and appl_tplay */
  91. typedef struct pEvntrec {
  92.     long ap_event;
  93.     long ap_value;
  94. }EVNTREC;
  95.  
  96.         /* evnt_button flags */
  97. #define LEFT_BUTTON        0x0001
  98. #define RIGHT_BUTTON     0x0002
  99. #define MIDDLE_BUTTON    0x0004
  100.  
  101. #define K_RSHIFT            0x0001
  102. #define K_LSHIFT            0x0002
  103. #define K_CTRL             0x0004
  104. #define K_ALT                0x0008
  105.  
  106.         /* evnt_dclick flags */
  107. #define EDC_INQUIRE        0
  108. #define EDC_SET            1
  109.  
  110.         /* event message values */
  111. #define MN_SELECTED     10
  112. #define WM_REDRAW      20
  113. #define WM_TOPPED      21
  114. #define WM_CLOSED      22
  115. #define WM_FULLED      23
  116. #define WM_ARROWED     24
  117. #define WM_HSLID         25
  118. #define WM_VSLID         26
  119. #define WM_SIZED         27
  120. #define WM_MOVED         28
  121. #define WM_NEWTOP      29
  122. #define WM_UNTOPPED     30
  123. #define WM_ONTOP         31
  124. #define WM_BOTTOMED     33
  125. #define WM_ICONIFY     34
  126. #define WM_UNICONIFY  35
  127. #define WM_ALLICONIFY 36
  128. #define WM_TOOLBAR     37
  129. #define AC_OPEN         40
  130. #define AC_CLOSE         41
  131. #define AP_TERM         50
  132. #define AP_TFAIL         51
  133. #define AP_RESCHG      57
  134.  
  135.         /* Xcontrol messages */
  136. #define CT_UPDATE      50
  137. #define CT_MOVE         51
  138. #define CT_NEWTOP      52
  139. #define CT_KEY          53
  140.  
  141. #define SHUT_COMPLETED     60
  142. #define RESCHG_COMPLETED 61
  143. #define RESCH_COMPLETED  61
  144. #define AP_DRAGDROP         63
  145. #define SH_WDRAW             72
  146. #define CH_EXIT             90
  147.  
  148.         /* evnt_mouse modes */
  149. #define MO_ENTER 0
  150. #define MO_LEAVE 1
  151.  
  152.         /* evnt_multi flags */
  153. #define MU_KEYBD    0x0001
  154. #define MU_BUTTON 0x0002
  155. #define MU_M1        0x0004
  156. #define MU_M2        0x0008
  157. #define MU_MESAG    0x0010
  158. #define MU_TIMER    0x0020
  159.  
  160.         /* form_dial opcodes */
  161. #define FMD_START         0
  162. #define FMD_GROW            1
  163. #define FMD_SHRINK        2
  164. #define FMD_FINISH        3
  165.  
  166.         /* form_error modes */
  167. #define FERR_FILENOTFOUND     2
  168. #define FERR_PATHNOTFOUND     3
  169. #define FERR_NOHANDLES         4
  170. #define FERR_ACCESSDENIED     5
  171. #define FERR_LOWMEM             8
  172. #define FERR_BADENVIRON     10
  173. #define FERR_BADFORMAT        11
  174. #define FERR_BADDRIVE        15
  175. #define FERR_DELETEDIR        16
  176. #define FERR_NOFILES         18
  177.  
  178.         /* fsel_(ex)input return values*/
  179. #define FSEL_CANCEL             0
  180. #define FSEL_OK                 1
  181.  
  182.         /* menu_attach modes */
  183. #define ME_INQUIRE        0
  184. #define ME_ATTACH         1
  185. #define ME_REMOVE         2
  186.  
  187.         /* menu_attach attributes */
  188. #define SCROLL_NO         0
  189. #define SCROLL_YES        1
  190.  
  191.         /* menu_bar modes */
  192. #define MENU_REMOVE        0
  193. #define MENU_INSTALL     1
  194. #define MENU_INQUIRE   -1
  195.  
  196.         /* menu_icheck modes */
  197. #define UNCHECK            0
  198. #define CHECK                1
  199.  
  200.         /* menu_ienable modes */
  201. #define DISABLE            0
  202. #define ENABLE             1
  203.  
  204.         /* menu_istart modes */
  205. #define MIS_GETALIGN     0
  206. #define MIS_SETALIGN     1
  207.  
  208.         /* menu_popup modes */
  209. #define SCROLL_LISTBOX -1
  210.  
  211.         /* menu_register modes */
  212. #define REG_NEWNAME      -1
  213.  
  214. /* menu_tnormal modes */
  215. #define HIGHLIGHT   0
  216. #define UNHIGHLIGHT 1
  217.  
  218. /* menu_settings uses a new structure for setting and inquiring the submenu
  219.  * delay values and the menu scroll height.    The delay values are measured in
  220.  * milliseconds and the height is based upon the number of menu items.
  221.  */
  222.  
  223. typedef struct _mn_set 
  224. {
  225.     long  display;        /*  the submenu display delay      */
  226.     long  drag;            /*  the submenu drag delay          */
  227.     long  delay;        /*  the single-click scroll delay */
  228.     long  speed;        /*  the continuous scroll delay     */
  229.     short height;         /*  the menu scroll height          */
  230. } MN_SET;
  231.  
  232. /* shel_get modes */
  233. #define SHEL_BUFSIZE (-1)
  234.  
  235.         /* shel_write modes */
  236. #define SWM_LAUNCH      0
  237. #define SWM_LAUNCHNOW  1
  238. #define SWM_LAUNCHACC  3
  239. #define SWM_SHUTDOWN   4
  240. #define SWM_REZCHANGE  5
  241. #define SWM_BROADCAST  7
  242. #define SWM_ENVIRON      8
  243. #define SWM_NEWMSG      9
  244. #define SWM_AESMSG     10
  245.  
  246.         /* shel_write flags */
  247. #define SW_PSETLIMIT 0x0100
  248. #define SW_PRENICE    0x0200
  249. #define SW_DEFDIR     0x0400
  250. #define SW_ENVIRON    0x0800
  251.  
  252. #define SD_ABORT      0
  253. #define SD_PARTIAL  1
  254. #define SD_COMPLETE 2
  255.  
  256.         /* rsrc_gaddr structure types */
  257. #define R_TREE         0
  258. #define R_OBJECT        1
  259. #define R_TEDINFO     2
  260. #define R_ICONBLK     3
  261. #define R_BITBLK        4
  262. #define R_STRING        5
  263. #define R_IMAGEDATA    6
  264. #define R_OBSPEC        7
  265. #define R_TEPTEXT     8
  266. #define R_TEPTMPLT    9
  267. #define R_TEPVALID  10
  268. #define R_IBPMASK   11
  269. #define R_IBPDATA   12
  270. #define R_IBPTEXT   13
  271. #define R_BIPDATA   14
  272. #define R_FRSTR      15
  273. #define R_FRIMG      16
  274.  
  275.  
  276.  
  277.         /* Window Attributes */
  278. #define NAME            0x0001
  279. #define CLOSER         0x0002
  280. #define FULLER         0x0004
  281. #define MOVER            0x0008
  282. #define INFO            0x0010
  283. #define SIZER            0x0020
  284. #define UPARROW        0x0040
  285. #define DNARROW        0x0080
  286. #define VSLIDE         0x0100
  287. #define LFARROW        0x0200
  288. #define RTARROW        0x0400
  289. #define HSLIDE         0x0800
  290. #define BACKDROP        0x2000
  291. #define SMALLER        0x4000
  292.  
  293.         /* wind_create flags */
  294. #define WC_BORDER      0
  295. #define WC_WORK         1
  296.  
  297.         /* wind_get flags */
  298. #define WF_KIND              1
  299. #define WF_NAME              2
  300. #define WF_INFO              3
  301. #define WF_WORKXYWH          4
  302. #define WF_CURRXYWH          5
  303. #define WF_PREVXYWH          6
  304. #define WF_FULLXYWH          7
  305. #define WF_HSLIDE           8
  306. #define WF_VSLIDE           9
  307. #define WF_TOP              10
  308. #define WF_FIRSTXYWH      11
  309. #define WF_NEXTXYWH         12
  310. #define WF_RESVD             13
  311. #define WF_NEWDESK         14
  312. #define WF_HSLSIZE         15
  313. #define WF_VSLSIZE         16
  314. #define WF_SCREEN          17
  315. #define WF_COLOR             18
  316. #define WF_DCOLOR          19
  317. #define WF_OWNER             20
  318. #define WF_BEVENT          24
  319. #define WF_BOTTOM          25
  320. #define WF_ICONIFY         26
  321. #define WF_UNICONIFY      27
  322. #define WF_UNICONIFYXYWH 28
  323. #define WF_TOOLBAR         30
  324. #define WF_FTOOLBAR         31
  325. #define WF_NTOOLBAR         32
  326. #define WF_WINX             22360
  327. #define WF_WINXCFG         22361
  328.  
  329.         /* window elements    */
  330. #define W_BOX            0
  331. #define W_TITLE        1
  332. #define W_CLOSER        2
  333. #define W_NAME         3
  334. #define W_FULLER        4
  335. #define W_INFO         5
  336. #define W_DATA         6
  337. #define W_WORK         7
  338. #define W_SIZER        8
  339. #define W_VBAR         9
  340. #define W_UPARROW   10
  341. #define W_DNARROW   11
  342. #define W_VSLIDE      12
  343. #define W_VELEV      13
  344. #define W_HBAR       14
  345. #define W_LFARROW   15
  346. #define W_RTARROW   16
  347. #define W_HSLIDE      17
  348. #define W_HELEV      18
  349. #define W_SMALLER   19
  350.  
  351.         /* arrow message    */
  352. #define WA_UPPAGE     0
  353. #define WA_DNPAGE     1
  354. #define WA_UPLINE     2
  355. #define WA_DNLINE     3
  356. #define WA_LFPAGE     4
  357. #define WA_RTPAGE     5
  358. #define WA_LFLINE     6
  359. #define WA_RTLINE     7
  360.  
  361.         /* wind_update flags */
  362. #define END_UPDATE 0
  363. #define BEG_UPDATE 1
  364. #define END_MCTRL  2
  365. #define BEG_MCTRL  3
  366.  
  367. /* graf_mouse mouse types*/
  368. #define ARROW                 0
  369. #define TEXT_CRSR          1
  370. #define BEE                  2
  371. #define BUSY_BEE          BEE     /* alias */
  372. #define BUSYBEE          BEE     /* alias */
  373. #define HOURGLASS          2
  374. #define POINT_HAND         3
  375. #define FLAT_HAND          4
  376. #define THIN_CROSS         5
  377. #define THICK_CROSS         6
  378. #define OUTLN_CROSS         7
  379. #define USER_DEF          255
  380. #define M_OFF              256
  381. #define M_ON              257
  382. #define M_SAVE           258
  383. #define M_LAST           259
  384. #define M_RESTORE       260
  385. #define M_FORCE      0x8000
  386.  
  387. /* objects - general */
  388. #define ROOT         0      /* index of ROOT */
  389. #define MAX_LEN    81      /* max string length */
  390. #define MAX_DEPTH  8      /* max depth of search or draw */
  391.  
  392. /* inside fill patterns */
  393. #define IP_HOLLOW 0
  394. #define IP_1PATT    1
  395. #define IP_2PATT    2
  396. #define IP_3PATT    3
  397. #define IP_4PATT    4
  398. #define IP_5PATT    5
  399. #define IP_6PATT    6
  400. #define IP_SOLID    7
  401.  
  402. /* normal graphics drawing modes */
  403. #define MD_REPLACE 1
  404. #define MD_TRANS     2
  405. #define MD_XOR      3
  406. #define MD_ERASE     4
  407.  
  408.         /* bit blt rules */
  409. #define ALL_WHITE   0
  410. #define S_AND_D      1
  411. #define S_AND_NOTD  2
  412. #define S_ONLY       3
  413. #define NOTS_AND_D  4
  414. #define D_ONLY       5
  415. #define S_XOR_D      6
  416. #define S_OR_D       7
  417. #define NOT_SORD      8
  418. #define NOT_SXORD   9
  419. #define D_INVERT     10
  420. #define NOT_D         10
  421. #define S_OR_NOTD  11
  422. #define NOT_S         12
  423. #define NOTS_OR_D  13
  424. #define NOT_SANDD  14
  425. #define ALL_BLACK  15
  426.  
  427.         /* font types */
  428. #define GDOS_PROP   0
  429. #define GDOS_MONO   1
  430. #define GDOS_BITM   2
  431. #define IBM           3
  432. #define SMALL          5
  433.  
  434.         /* object types */
  435. #define G_BOX         20
  436. #define G_TEXT      21
  437. #define G_BOXTEXT  22
  438. #define G_IMAGE     23
  439. #define G_USERDEF  24
  440. #define G_PROGDEF  G_USERDEF
  441. #define G_IBOX      25
  442. #define G_BUTTON     26
  443. #define G_BOXCHAR  27
  444. #define G_STRING     28
  445. #define G_FTEXT     29
  446. #define G_FBOXTEXT 30
  447. #define G_ICON      31
  448. #define G_TITLE     32
  449. #define G_CICON     33
  450.  
  451. /* object flags */
  452. #define NONE         0x0000
  453. #define SELECTABLE 0x0001
  454. #define DEFAULT     0x0002
  455. #define EXIT         0x0004
  456. #define EDITABLE     0x0008
  457. #define RBUTTON     0x0010
  458. #define LASTOB      0x0020
  459. #define TOUCHEXIT  0x0040
  460. #define HIDETREE     0x0080
  461. #define INDIRECT     0x0100
  462. #define FL3DIND     0x0200    /* bit 9 */
  463. #define FL3DBAK     0x0400    /* bit 10 */
  464. #define FL3DACT     0x0600
  465. #define SUBMENU     0x0800    /* bit 11 */
  466. #define FLAG11         SUBMENU
  467. #define FLAG12         0x1000
  468. #define FLAG13         0x2000
  469. #define FLAG14         0x4000
  470. #define FLAG15         0x5000
  471.  
  472. /* Object states */
  473. #define NORMAL      0x0000
  474. #define SELECTED     0x0001
  475. #define CROSSED     0x0002
  476. #define CHECKED     0x0004
  477. #define DISABLED     0x0008
  478. #define OUTLINED     0x0010
  479. #define SHADOWED     0x0020
  480. #define WHITEBAK     0x0040
  481. #define DRAW3D        0x0080
  482. #define STATE08    0x0100
  483. #define STATE09     0x0200
  484. #define STATE10    0x0400
  485. #define STATE11    0x0800
  486. #define STATE12     0x1000
  487. #define STATE13     0x2000
  488. #define STATE14     0x4000
  489. #define STATE15     0x8000
  490.  
  491. /* Object colors - default pall. */
  492. #define WHITE      0
  493. #define BLACK      1
  494. #define RED       2
  495. #define GREEN      3
  496. #define BLUE      4
  497. #define CYAN      5
  498. #define YELLOW   6
  499. #define MAGENTA  7
  500. #define LWHITE   8
  501. #define LBLACK   9
  502. #define LRED      10
  503. #define LGREEN   11
  504. #define LBLUE      12
  505. #define LCYAN      13
  506. #define LYELLOW  14
  507. #define LMAGENTA 15
  508.  
  509. /* editable text field definitions */
  510. #define EDSTART        0
  511. #define EDINIT         1
  512. #define EDCHAR         2
  513. #define EDEND            3
  514.  
  515. #define ED_START        EDSTART
  516. #define ED_INIT        EDINIT
  517. #define ED_CHAR        EDCHAR
  518. #define ED_END         EDEND
  519.  
  520. /* editable text justification */
  521. #define TE_LEFT        0
  522. #define TE_RIGHT        1
  523. #define TE_CNTR        2
  524.  
  525. /* objc_change modes */
  526. #define NO_DRAW        0
  527. #define REDRAW         1
  528.  
  529. /* objc_order modes */
  530. #define OO_LAST      -1
  531. #define OO_FIRST        0
  532.  
  533. /* objc_sysvar modes */
  534. #define SV_INQUIRE    0
  535. #define SV_SET         1
  536.  
  537. /* objc_sysvar values */
  538. #define LK3DIND        1
  539. #define LK3DACT        2
  540. #define INDBUTCOL     3
  541. #define ACTBUTCOL     4
  542. #define BACKGRCOL     5
  543. #define AD3DVAL        6
  544.  
  545.         /* Mouse Form Definition Block */
  546. typedef struct mouse_form {
  547.     short mf_xhot;
  548.     short mf_yhot;
  549.     short mf_nplanes;
  550.     short mf_bg;
  551.     short mf_fg;
  552.     short mf_mask[16];
  553.     short mf_data[16];
  554. }MFORM;
  555.  
  556. typedef struct graphic_rectangle
  557. {
  558.     int     g_x;
  559.     int     g_y;
  560.     int     g_w;
  561.     int     g_h;
  562. } GRECT;
  563.  
  564. typedef struct objc_colorword 
  565. {
  566.     unsigned borderc : 4;
  567.     unsigned textc   : 4;
  568.     unsigned opaque  : 1;
  569.     unsigned pattern : 3;
  570.     unsigned fillc   : 4;
  571. }OBJC_COLORWORD;
  572.  
  573. typedef struct text_edinfo
  574. {
  575.     char *te_ptext;        /* ptr to text */
  576.     char *te_ptmplt;        /* ptr to template */
  577.     char *te_pvalid;        /* ptr to validation chrs. */
  578.     short te_font;         /* font */
  579.     short te_fontid;        /* font id */
  580.     short te_just;         /* justification */
  581.     short te_color;        /* color information word */
  582.     short te_fontsize;    /* font size */
  583.     short te_thickness;    /* border thickness */
  584.     short te_txtlen;        /* length of text string */
  585.     short te_tmplen;        /* length of template string */
  586. } TEDINFO;
  587.  
  588. typedef struct icon_block {
  589.     short *ib_pmask;
  590.     short *ib_pdata;
  591.     char    *ib_ptext;
  592.     short ib_char;
  593.     short ib_xchar;
  594.     short ib_ychar;
  595.     short ib_xicon;
  596.     short ib_yicon;
  597.     short ib_wicon;
  598.     short ib_hicon;
  599.     short ib_xtext;
  600.     short ib_ytext;
  601.     short ib_wtext;
  602.     short ib_htext;
  603. }ICONBLK;
  604.  
  605. typedef struct bit_block {
  606.     short *bi_pdata;    /* ptr to bit forms data  */
  607.     short bi_wb;        /* width of form in bytes */
  608.     short bi_hl;        /* height in lines */
  609.     short bi_x;         /* source x in bit form */
  610.     short bi_y;         /* source y in bit form */
  611.     short bi_color;    /* fg color of blt */
  612. }BITBLK;
  613.  
  614. typedef struct cicon_data {
  615.     short                 num_planes;
  616.     short                 *col_data;
  617.     short                 *col_mask;
  618.     short                 *sel_data;
  619.     short                 *sel_mask;
  620.     struct cicon_data *next_res;
  621. }CICON;
  622.  
  623. typedef struct cicon_blk {
  624.     ICONBLK monoblk;
  625.     CICON   *mainlist;
  626. }CICONBLK;
  627.  
  628. typedef struct {
  629.      unsigned int character   :  8;
  630.      signed     int framesize   :  8;
  631.      unsigned int framecol      :  4;
  632.      unsigned int textcol      :  4;
  633.      unsigned int textmode      :  1;
  634.      unsigned int fillpattern :  3;
  635.      unsigned int interiorcol :  4;
  636. } BFOBSPEC;
  637.  
  638. struct user_block;    /* forward declaration */
  639.  
  640. typedef union obspecptr
  641. {
  642.     long                    index;
  643.     union obspecptr    *indirect;
  644.     BFOBSPEC             obspec;
  645.     TEDINFO                *tedinfo;
  646.     BITBLK                *bitblk;
  647.     ICONBLK                *iconblk;
  648.     CICONBLK             *ciconblk;
  649.     struct user_block *userblk;
  650.     char                    *free_string;
  651. } OBSPEC;
  652.  
  653. typedef struct object
  654. {
  655.     short             ob_next;         /* -> object's next sibling          */
  656.     short             ob_head;     /* -> head of object's children      */
  657.     short             ob_tail;     /* -> tail of object's children      */
  658.     unsigned short ob_type;     /* type of object           */
  659.     unsigned short ob_flags;    /* flags               */
  660.     unsigned short ob_state;    /* state               */
  661.     OBSPEC            ob_spec;     /* object-specific data           */
  662.     short             ob_x;         /* upper left corner of object          */
  663.     short             ob_y;         /* upper left corner of object          */
  664.     short             ob_width;    /* width of obj                  */
  665.     short             ob_height;    /* height of obj              */
  666. } OBJECT;
  667.  
  668. typedef struct parm_block
  669. {
  670.     OBJECT *pb_tree;
  671.     short  pb_obj;
  672.     short  pb_prevstate;
  673.     short  pb_currstate;
  674.     short  pb_x, pb_y, pb_w, pb_h;
  675.     short  pb_xc, pb_yc, pb_wc, pb_hc;
  676.     long     pb_parm;
  677. } PARMBLK;
  678.  
  679. typedef struct user_block
  680. {
  681.     int __CDECL (*ub_code)(PARMBLK *parmblock);
  682.     long ub_parm;
  683. } USERBLK;
  684.  
  685.  
  686. typedef struct rshdr
  687. {
  688.     short     rsh_vrsn;
  689.     unsigned short rsh_object;
  690.     unsigned short rsh_tedinfo;
  691.     unsigned short rsh_iconblk;    /* list of ICONBLKS        */
  692.     unsigned short rsh_bitblk;
  693.     unsigned short rsh_frstr;
  694.     unsigned short rsh_string;
  695.     unsigned short rsh_imdata; /* image data            */
  696.     unsigned short rsh_frimg;
  697.     unsigned short rsh_trindex;
  698.     short     rsh_nobs;    /* counts of various structs    */
  699.     short     rsh_ntree;
  700.     short     rsh_nted;
  701.     short     rsh_nib;
  702.     short     rsh_nbb;
  703.     short     rsh_nstring;
  704.     short     rsh_nimages;
  705.     unsigned short rsh_rssize; /* total bytes in resource */
  706. } RSHDR;
  707.  
  708. typedef struct _menu
  709. {
  710.     OBJECT    *mn_tree;
  711.     short        mn_menu;
  712.     short        mn_item;
  713.     short        mn_scroll;
  714.     short        mn_keystate;
  715. } MENU;
  716.  
  717. typedef struct
  718. {
  719.     int     m_out;
  720.     int     m_x;
  721.     int     m_y;
  722.     int     m_w;
  723.     int    m_h;
  724. } MOBLK;
  725.  
  726. typedef struct mouse_event_type
  727. {
  728.     int    *x;
  729.     int    *y;
  730.     int    *b;
  731.     int    *k;
  732. } MOUSE;
  733.  
  734. #endif 
  735.  
  736. #ifdef __GEMLIB_AES
  737.  
  738. /*******************************************************************************
  739.  * The AES bindings from old aesbind.h
  740.  */
  741.      
  742. extern int    appl_bvset         (int bvdisk, int bvhard);
  743. extern int    appl_control    (int ap_cid, int ap_cwhat, void *ap_cout);
  744. extern int    appl_exit         (void);
  745. extern int    appl_find         (char *Name);
  746. extern int    appl_getinfo     (int type, int *out1, int *out2, int *out3, int *out4);
  747. extern int    appl_init         (void);
  748. extern int    appl_read         (int ApId, int Length, void *ApPbuff);
  749. extern int    appl_search     (int mode, char *fname, int *type, int *ap_id);
  750. extern int    appl_tplay         (void *Mem, int Num, int Scale);
  751. extern int    appl_trecord     (void *Mem, int Count);
  752. extern int    appl_write         (int ApId, int Length, void *ApPbuff);
  753. extern int     appl_yield         (void);
  754.  
  755. extern int    evnt_button     (int Clicks, int WhichButton,    int WhichState, int *Mx, int *My, int *ButtonState, int *KeyState); 
  756. extern int    evnt_dclick     (int ToSet, int SetGet);
  757. extern int    evnt_keybd         (void);
  758. extern int    evnt_mesag         (int MesagBuf[]);
  759. extern int    evnt_mouse         (int EnterExit, int InX, int InY, int InW, int InH, int *OutX, int *OutY, int *ButtonState, int *KeyState); 
  760. extern int     evnt_multi         (int Type, int Clicks, int WhichButton, int WhichState, 
  761.                                             int EnterExit1, int In1X, int In1Y, int In1W, int In1H, 
  762.                                             int EnterExit2, int In2X, int In2Y, int In2W, int In2H,
  763.                                             int MesagBuf[], unsigned long Interval, int *OutX, int *OutY,
  764.                                             int *ButtonState, int *KeyState, int *Key, int *ReturnCount);
  765. extern int    evnt_timer         (unsigned long Interval);
  766.  
  767. extern int     form_alert         (int DefButton, char *Str);
  768. extern int     form_button     (void *Btree, int Bobject, int Bclicks, int *Bnxtobj);
  769. extern int     form_center     (void *Tree, int *Cx, int *Cy, int *Cw, int *Ch);
  770. extern int     form_dial         (int Flag, int Sx, int Sy, int Sw, int Sh, int Bx, int By, int Bw, int Bh);
  771. extern int     form_do             (void *Tree, int StartObj);
  772. extern int     form_error         (int ErrorCode);
  773. extern int     form_keybd         (void *Ktree, int Kobject, int Kobnext, int Kchar, int *Knxtobject, int *Knxtchar);
  774.  
  775. extern int     fsel_exinput     (char *Path, char *File, int *ExitButton, char *title);
  776. extern int     fsel_input         (char *Path, char *File, int *ExitButton);
  777.  
  778. extern int     graf_dragbox     (int Sw, int Sh, int Sx, int Sy, int Bx, int By, int Bw, int Bh, int *Fw, int *Fh); 
  779. extern int     graf_growbox     (int Sx, int Sy, int Sw, int Sh, int Fx, int Fy, int Fw, int Fh); 
  780. extern int     graf_handle         (int *Wchar, int *Hchar, int *Wbox, int *Hbox);
  781. extern int     graf_mbox         (int Sw, int Sh, int Sx, int Sy, int Dx, int Dy);
  782. #define         graf_movebox    (a,b,c,d,e,f)    graf_mbox(a,b,c,d,e,f)
  783. extern int     graf_mkstate     (int *Mx, int *My, int *ButtonState, int *KeyState); 
  784. extern int     graf_mouse         (int Form, void *FormAddress);
  785. extern int     graf_rubbbox    (int Ix, int Iy, int Iw, int Ih, int *Fw, int *Fh);
  786. #define        graf_rubberbox (a,b,c,d,e,f)    graf_rubbbox(a,b,c,d,e,f)
  787. extern int     graf_shrinkbox (int Fx, int Fy, int Fw, int Fh, int Sx, int Sy, int Sw, int Sh); 
  788. extern int     graf_slidebox     (void *Tree, int Parent, int Object, int Direction); 
  789. extern int     graf_watchbox     (void *Tree, int Object, int InState, int OutState);
  790.  
  791. extern int     menu_attach     (int me_flag, OBJECT *me_tree, int me_item, MENU *me_mdata);
  792. extern int     menu_bar         (void *Tree, int ShowFlag);
  793. extern int    menu_click        (int click, int setit);
  794. extern int     menu_icheck     (void *Tree, int Item, int CheckFlag);
  795. extern int     menu_ienable    (void *Tree, int Item, int EnableFlag);
  796. extern int     menu_istart     (int me_flag, OBJECT *me_tree, int me_imenu, int me_item);
  797. extern int     menu_popup         (MENU *me_menu, int me_xpos, int me_ypos, MENU *me_mdata);
  798. extern int     menu_register     (int ApId, char *MenuText);
  799. extern int     menu_settings     (int me_flag, MN_SET *me_values);
  800. extern int     menu_text         (void *Tree, int Item, char *Text);
  801. extern int     menu_tnormal     (void *Tree, int Item, int NormalFlag);
  802. extern int    menu_unregister(int id);
  803.  
  804. extern int    objc_add         (void *Tree, int Parent, int Child);
  805. extern int    objc_change     (void *Tree, int Object, int Res, int Cx, int Cy, int Cw, int Ch, int NewState,int Redraw);
  806. extern int    objc_delete     (void *Tree, int Object);
  807. extern int    objc_draw         (void *Tree, int Start, int Depth, int Cx,int Cy, int Cw, int Ch);
  808. extern int    objc_edit         (void *Tree, int Object, int Char, int *Index, int Kind); 
  809. extern int    objc_find         (void *Tree, int Start, int Depth, int Mx, int My);
  810. extern int    objc_offset     (void *Tree, int Object, int *X, int *Y);
  811. extern int    objc_order         (void *Tree, int Object, int NewPos);
  812. extern int    objc_sysvar     (int mode, int which, int in1, int in2, int *out1, int *out2);
  813.  
  814. extern int    rsrc_free         (void);
  815. extern int    rsrc_gaddr         (int Type, int Index, void *Address);
  816. extern int    rsrc_load         (char *Name);
  817. extern int    rsrc_obfix         (void *Tree, int Index);
  818. extern int    rsrc_rcfix         (void *rc_header);
  819. extern int    rsrc_saddr         (int Type, int Index, void *Address);
  820.  
  821. extern int    scrp_clear         (void);
  822. extern int    scrp_read         (char *Scrappath);
  823. extern int    scrp_write         (char *Scrappath);
  824.  
  825. extern int    shel_envrn         (char **result, char *param);
  826. extern int    shel_find         (char *buf);
  827. extern int     shel_get         (char *Buf, int Len);
  828. extern int    shel_help        (int sh_hmode, char *sh_hfile, char *sh_hkey);
  829. extern int     shel_put             (char *Buf, int Len);
  830. extern int    shel_rdef        (char *lpcmd, char *lpdir);
  831. extern int    shel_read         (char *Command, char *Tail);
  832. extern int    shel_wdef        (char *lpcmd, char *lpdir);
  833. extern int    shel_write        (int Exit, int Graphic, int Aes, void *Command, char *Tail);
  834.  
  835. extern int    wind_calc         (int Type, int Parts, int InX, int InY, int InW, int InH, int *OutX, int *OutY, int *OutW, int *OutH);    
  836. extern int    wind_close         (int WindowHandle);
  837. extern int    wind_create     (int Parts, int Wx, int Wy, int Ww, int Wh); 
  838. extern int    wind_delete     (int WindowHandle);
  839. extern int    wind_find         (int X, int Y);
  840. extern int    wind_get         (int WindowHandle, int What, int *W1, int *W2, int *W3, int *W4); 
  841. extern void    wind_new         (void);
  842. extern int    wind_open         (int WindowHandle, int Wx, int Wy, int Ww, int Wh);
  843. extern int    wind_set         (int WindowHandle, int What, int W1, int W2, int W3, int W4);
  844. extern int    wind_update     (int Code);
  845.  
  846.  
  847. /*
  848.  * Some usefull extensions.
  849.  */
  850. extern int    wind_calc_grect    (int Type, int Parts, GRECT *In, GRECT *Out);  
  851. extern int    wind_create_grect    (int Parts, GRECT *r); 
  852. extern void    wind_get_grect        (int WindowHandle, int What, GRECT *r);
  853. extern int    wind_open_grect     (int WindowHandle, GRECT *r);
  854. extern void wind_set_grect        (int WindowHandle, int What, GRECT *r);
  855. extern void wind_set_str        (int WindowHandle, int What, char *str);
  856.  
  857. extern int    rc_copy                 (GRECT *src, GRECT *dst);
  858. extern int    rc_equal             (GRECT *src, GRECT *dst);
  859. extern int     rc_intersect         (GRECT *r1, GRECT *r2);
  860. extern int     *grect_to_array     (GRECT *area, int *array);
  861. extern void    array_to_grect        (int *array, GRECT *area);
  862.  
  863.  
  864. /*
  865.  * aes trap interface
  866. */
  867. /* Array sizes in aes control block */
  868. #define AES_CTRLMAX        5
  869. #define AES_GLOBMAX        16
  870. #define AES_INTINMAX     16
  871. #define AES_INTOUTMAX    16
  872. #define AES_ADDRINMAX    16
  873. #define AES_ADDROUTMAX    16
  874.  
  875. typedef struct
  876. {
  877.     short *control;
  878.     short *global;
  879.     short *intin;
  880.     short *intout;
  881.     long    *addrin;
  882.     long    *addrout;
  883. } AESPB;
  884.  
  885. extern short    aes_global[], aes_control[], aes_intin[], aes_intout[];
  886. extern long     aes_addrin[], aes_addrout[];
  887. extern AESPB    aes_params;
  888. extern int        gl_apid, gl_ap_version;            /* initialized in appl_init */
  889.  
  890. extern void aes(AESPB *pb);
  891.  
  892. #endif /* AES */
  893.  
  894.  
  895.  
  896. #ifdef __GEMLIB_DEFS
  897.  
  898. /*******************************************************************************
  899.  * The VDI specific stuff from old gemfast.h
  900.  */
  901.  
  902. /* v_bez modes */
  903. #define BEZ_BEZIER    0x01
  904. #define BEZ_POLYLINE 0x00
  905. #define BEZ_NODRAW    0x02
  906.  
  907. /* v_bit_image modes */
  908. #define IMAGE_LEFT    0
  909. #define IMAGE_CENTER 1
  910. #define IMAGE_RIGHT    2
  911. #define IMAGE_TOP     0
  912. #define IMAGE_BOTTOM 2
  913.  
  914. /* v_justified modes */
  915. #define NOJUSTIFY 0
  916. #define JUSTIFY    1
  917.  
  918. /* vq_color modes */
  919. #define COLOR_REQUESTED 0
  920. #define COLOR_ACTUAL     1
  921.  
  922. /* return values for vq_vgdos() inquiry */
  923. #define GDOS_NONE (-2L)          /* no GDOS installed */
  924. #define GDOS_FSM    0x5F46534DL /* '_FSM' */
  925. #define GDOS_FNT    0x5F464E54L /* '_FNT' */
  926.  
  927. /* vqin_mode & vsin_mode modes */
  928. #define LOCATOR  1
  929. #define VALUATOR 2
  930. #define CHOICE   3
  931. #define STRING   4
  932.  
  933. /* vqt_cachesize modes */
  934. #define CACHE_CHAR 0
  935. #define CACHE_MISC 1
  936.  
  937. /* vqt_devinfo return values */
  938. #define DEV_MISSING     0
  939. #define DEV_INSTALLED 1
  940.  
  941. /* vqt_name return values */
  942. #define BITMAP_FONT 0
  943.  
  944. /* vsf_interior modes */
  945. #define FIS_HOLLOW  0
  946. #define FIS_SOLID   1
  947. #define FIS_PATTERN 2
  948. #define FIS_HATCH   3
  949. #define FIS_USER      4
  950.  
  951. /* vsf_perimeter modes */
  952. #define PERIMETER_OFF 0
  953. #define PERIMETER_ON  1
  954.  
  955. /* vsl_ends modes */
  956. #define SQUARE  0
  957. #define ARROWED 1
  958. #define ROUND     2
  959.  
  960. /* vsl_type modes */
  961. #define SOLID         1
  962. #define LDASHED     2
  963. #define DOTTED      3
  964. #define DASHDOT     4
  965. #define DASH         5
  966. #define DASHDOTDOT 6
  967. #define USERLINE     7
  968.  
  969. /* vsm_type modes */
  970. #define MRKR_DOT         1
  971. #define MRKR_PLUS      2
  972. #define MRKR_ASTERISK 3
  973. #define MRKR_BOX         4
  974. #define MRKR_CROSS     5
  975. #define MRKR_DIAMOND  6
  976.  
  977. /* vst_alignment modes */
  978. #define TA_LEFT         0 /* horizontal */
  979. #define TA_CENTER       1
  980. #define TA_RIGHT        2
  981. #define TA_BASE         0 /* vertical */
  982. #define TA_HALF         1
  983. #define TA_ASCENT       2
  984. #define TA_BOTTOM       3
  985. #define TA_DESCENT      4
  986. #define TA_TOP          5
  987.  
  988. /* vst_charmap modes */
  989. #define MAP_BITSTREAM 0
  990. #define MAP_ATARI      1
  991.  
  992. /* vst_effects modes */
  993. #define TXT_NORMAL       0x0000
  994. #define TXT_THICKENED    0x0001
  995. #define TXT_LIGHT        0x0002
  996. #define TXT_SKEWED       0x0004
  997. #define TXT_UNDERLINED   0x0008
  998. #define TXT_OUTLINED     0x0010
  999. #define TXT_SHADOWED     0x0020
  1000.  
  1001. /* vst_error modes */
  1002. #define APP_ERROR     0
  1003. #define SCREEN_ERROR 1
  1004.  
  1005. /* vst_error return values */
  1006. #define NO_ERROR            0
  1007. #define CHAR_NOT_FOUND    1
  1008. #define FILE_READERR     8
  1009. #define FILE_OPENERR     9
  1010. #define BAD_FORMAT      10
  1011. #define CACHE_FULL      11
  1012. #define MISC_ERROR      (-1)
  1013.  
  1014. /* vst_kern modes */
  1015. #define TRACK_NONE        0
  1016. #define TRACK_NORMAL     1
  1017. #define TRACK_TIGHT        2
  1018. #define TRACK_VERYTIGHT 3
  1019.  
  1020. /* vst_scratch modes */
  1021. #define SCRATCH_BOTH   0
  1022. #define SCRATCH_BITMAP 1
  1023. #define SCRATCH_NONE   2
  1024.  
  1025. /* v_updwk return values */
  1026. #define SLM_OK       0x00
  1027. #define SLM_ERROR   0x02
  1028. #define SLM_NOTONER 0x03
  1029. #define SLM_NOPAPER 0x04
  1030.  
  1031.         /* VDI Memory Form Definition Block */
  1032. typedef struct
  1033. {
  1034.     void        *fd_addr;
  1035.     short     fd_w;      /* Form Width in Pixels                      */
  1036.     short     fd_h;         /* Form Height in Pixels                     */
  1037.     short     fd_wdwidth; /* Form Width in shorts(fd_w/sizeof(int)*/
  1038.     short     fd_stand;    /* Form format 0= device spec 1=standard*/
  1039.     short     fd_nplanes; /* Number of memory planes                  */
  1040.     short     fd_r1;        /* Reserved                                      */
  1041.     short     fd_r2;        /* Reserved                                      */
  1042.     short     fd_r3;        /* Reserved                                      */
  1043. } MFDB;
  1044.  
  1045. #endif 
  1046.  
  1047. #ifdef __GEMLIB_VDI
  1048.  
  1049. /*******************************************************************************
  1050.  * The VDI bindings from old vdibind.h
  1051.  */
  1052.  
  1053. /*
  1054.  * attribute functions 
  1055. */
  1056. extern void    vs_color                (int handle, int index, int rgb[]);
  1057. extern int     vswr_mode            (int handle, int mode);
  1058.  
  1059. extern int     vsf_color             (int handle, int index);
  1060. extern int     vsf_interior         (int handle, int style);
  1061. extern int     vsf_perimeter         (int handle, int vis);
  1062. extern int     vsf_style             (int handle, int style);
  1063. extern void    vsf_udpat             (int handle, int pat[], int planes);
  1064.  
  1065. extern int     vsl_color             (int handle, int index);
  1066. extern void vsl_ends             (int handle, int begstyle, int endstyle);
  1067. extern int     vsl_type             (int handle, int style);
  1068. extern void vsl_udsty             (int handle, int pat);
  1069. extern int     vsl_width             (int handle, int width);
  1070.  
  1071. extern int     vsm_color             (int handle, int index);
  1072. extern int     vsm_height             (int handle, int height);
  1073. extern int     vsm_type             (int handle, int symbol);
  1074.  
  1075. extern void vst_alignment         (int handle, int hin, int vin, int *hout, int *vout);
  1076. extern int     vst_color             (int handle, int index);
  1077. extern int     vst_effects            (int handle, int effects);
  1078. extern void vst_error             (int handle, int mode, short *errorvar);
  1079. extern int     vst_font             (int handle, int font);
  1080. extern int     vst_height             (int handle, int height,    int *charw, int *charh, int *cellw, int *cellh);
  1081. extern int     vst_point             (int handle, int point, int *charw, int *charh, int *cellw, int *cellh);
  1082. extern int     vst_rotation         (int handle, int ang);
  1083. extern void vst_scratch         (int handle, int mode);
  1084.  
  1085. /*
  1086.  * control functions
  1087. */
  1088. extern void    v_clrwk                (int handle);
  1089. extern void    v_clsvwk                (int handle);
  1090. extern void    v_clswk                (int handle);
  1091. extern int    v_flushcache        (int handle);
  1092. extern int    v_loadcache            (int handle, char *filename, int mode);
  1093. extern void    v_opnvwk                (int work_in[], int *handle, int work_out[]);
  1094. extern void    v_opnwk                (int work_in[], int *handle, int work_out[]);
  1095. extern int    v_savecache            (int handle, char *filename);
  1096. extern void    v_set_app_buff        (int handle, void *buf_p, int size);
  1097. extern void    v_updwk                (int handle);
  1098. extern void    vs_clip                (int handle, int clip_flag, int pxyarray[]);
  1099. extern int    vst_load_fonts        (int handle, int select);
  1100. extern void    vst_unload_fonts    (int handle, int select);
  1101.  
  1102. /*
  1103.  * escape functions
  1104. */
  1105. extern void    v_bit_image            (int handle, char *filename, int aspect, int x_scale, int y_scale, int h_align, int v_align, int *pxyarray);
  1106. extern void    v_clear_disp_list    (int handle);
  1107. extern int    v_copies                (int handle, int count);
  1108. extern void    v_dspcur                (int handle, int x, int y);
  1109. extern void    v_form_adv            (int handle);
  1110. extern void    v_hardcopy            (int handle);
  1111. extern int    v_orient                (int handle, int orientation);
  1112. extern void    v_output_window    (int handle, int *pxyarray);
  1113. extern int    v_page_size            (int handle, int page_id);
  1114. extern void    v_rmcur                (int handle);
  1115. extern void    v_trays                (int handle, int input, int output, int *set_input, int *set_output);
  1116. extern int    vq_calibrate        (int handle, int *flag);
  1117. extern int    vq_page_name        (int handle, int page_id, char *page_name, long *page_width, long *page_height);
  1118. extern void    vq_scan                (int handle, int *g_slice, int *g_page, int *a_slice, int *a_page, int *div_fac);
  1119. extern int    vq_tabstatus        (int handle);
  1120. extern void    vq_tray_names        (int handle, char *input_name, char *output_name, int *input, int *output);
  1121. extern int    vs_calibrate        (int handle, int flag, int *rgb);
  1122. extern int    vs_palette            (int handle, int palette);
  1123.  
  1124. extern void    vq_tdimensions        (int handle, int *xdimension, int *ydimension);
  1125. extern void    vt_alignment        (int handle, int dx, int dy);
  1126. extern void    vt_axis                (int handle, int xres, int yres, int *xset, int *yset);
  1127. extern void    vt_origin            (int handle, int xorigin, int yorigin);
  1128. extern void    vt_resolution        (int handle, int xres, int yres, int *xset, int *yset);
  1129.  
  1130. extern void    v_meta_extents        (int handle, int min_x, int min_y, int max_x, int max_y);
  1131. extern void    v_write_meta        (int handle, int numvdi_intin, int *avdi_intin, int num_ptsin, int *a_ptsin);
  1132. extern void    vm_coords            (int handle, int llx, int lly, int urx, int ury);
  1133. extern void    vm_filename            (int handle, char *filename);
  1134. extern void    vm_pagesize            (int handle, int pgwidth, int pgheight);
  1135.  
  1136. extern void    vsc_expose            (int handle, int state);
  1137. extern void    vsp_film                (int handle, int index, int lightness);
  1138.  
  1139. extern void    v_escape2000        (int handle, int times);
  1140.  
  1141. extern void    v_alpha_text        (int handle, char *str);
  1142. extern void    v_curdown            (int handle);
  1143. extern void    v_curhome            (int handle);
  1144. extern void    v_curleft            (int handle);
  1145. extern void    v_curright            (int handle);
  1146. extern void    v_curtext            (int handle, char *str);
  1147. extern void    v_curup                (int handle);
  1148. extern void    v_eeol                (int handle);
  1149. extern void    v_eeos                (int handle);
  1150. extern void    v_enter_cur            (int handle);
  1151. extern void    v_exit_cur            (int handle);
  1152. extern void    v_rvoff                (int handle);
  1153. extern void    v_rvon                (int handle);
  1154. extern void    vq_chcells            (int handle, int *n_rows, int *n_cols);
  1155. extern void    vq_curaddress        (int handle, int *cur_row, int *cur_col);
  1156. extern void    vs_curaddress        (int handle, int row, int col);
  1157.     
  1158.  
  1159. /*
  1160.  * inquiry functions
  1161. */
  1162. extern void    vq_cellarray        (int handle, int pxyarray[], int row_len, int nrows, int *el_used, int *rows_used, int *status, int color[]);
  1163. extern int    vq_color                (int handle, int index, int flag, int rgb[]);
  1164. extern void    vq_extnd                (int handle, int flag, int work_out[]);
  1165. extern void    vqf_attributes        (int handle, int atrib[]);
  1166. extern void    vqin_mode            (int handle, int dev, int *mode);
  1167. extern void    vql_attribute        (int handle, int atrib[]);
  1168. extern void    vqm_attributes        (int handle, int atrib[]);
  1169. extern void    vqt_attributes        (int handle, int atrib[]);
  1170. extern void    vqt_cachesize        (int handle, int which_cache, long *size);
  1171. extern void    vqt_extent            (int handle, char *str, int extent[]);
  1172. extern void    vqt_fontinfo        (int handle, int *minade, int *maxade, int distances[], int *maxwidth, int effects[]);
  1173. extern void    vqt_get_table        (int handle, short **map);
  1174. extern int    vqt_name                (int handle, int element, char *name);
  1175. extern int    vqt_width            (int handle, int chr, int *cw, int *ldelta, int *rdelta);
  1176.  
  1177. extern int    vq_gdos                 (void);
  1178. extern long vq_vgdos             (void);
  1179.  
  1180.  
  1181. /*
  1182.  * input function
  1183. */
  1184. extern void    v_hide_c                (int handle);
  1185. extern void    v_show_c                (int handle, int reset);
  1186. extern void    vex_butv                (int handle, void *pusrcode, void **psavcode);
  1187. extern void    vex_curv                (int handle, void *pusrcode, void **psavcode);
  1188. extern void    vex_motv                (int handle, void *pusrcode, void **psavcode);
  1189. extern void    vex_timv                (int handle, void *time_addr, void **otime_addr, int *time_conv);
  1190. extern void    vq_key_s                (int handle, int *state);
  1191. extern void    vq_mouse                (int handle, int *pstatus, int *x, int *y);
  1192. extern void    vrq_choice            (int handle, int cin, int *cout);
  1193. extern void    vrq_locator            (int handle, int x, int y, int *xout, int *yout, int *term);
  1194. extern void    vrq_string            (int handle, int len, int echo, int echoxy[], char *str);
  1195. extern void    vrq_valuator        (int handle, int in, int *out, int *term);
  1196. extern void    vsc_form                (int handle, int form[]);
  1197. extern int    vsin_mode            (int handle, int dev, int mode);
  1198. extern int    vsm_choice            (int handle, int *choice);
  1199. extern int    vsm_locator            (int handle, int x, int y, int *xout, int *yout, int *term);
  1200. extern int    vsm_string            (int handle, int len, int echo, int echoxy[], char *str);
  1201. extern void    vsm_valuator        (int handle, int in, int *out, int *term, int *status);
  1202.  
  1203.  
  1204. /*
  1205.  * output functions
  1206. */
  1207. extern void    v_arc                    (int handle, int x, int y, int radius, int begang, int endang);
  1208. extern void    v_bar                    (int handle, int pxyarray[]);
  1209. extern void    v_cellarray            (int handle, int pxyarray[], int row_length, int elements, int nrows, int write_mode, int colarray[]);
  1210. extern void    v_circle                (int handle, int x, int y, int radius);
  1211. extern void    v_contourfill        (int handle, int x, int y, int index);
  1212. extern void    v_ellarc                (int handle, int x, int y, int xrad, int yrad, int begang, int endang);
  1213. extern void    v_ellipse            (int handle, int x, int y, int xrad, int yrad);
  1214. extern void    v_ellpie                (int handle, int x, int y, int xrad, int yrad, int begang, int endang);
  1215. extern void    v_fillarea            (int handle, int count, int pxyarray[]);
  1216. extern void    v_gtext                (int handle, int x, int y, char *str) ;
  1217. extern void    v_justified            (int handle, int x, int y, char *str, int len, int word_space, int char_space);
  1218. extern void    v_pieslice            (int handle, int x, int y, int radius, int begang, int endang);
  1219. extern void    v_pline                (int handle, int count, int pxyarray[]);
  1220. extern void    v_pmarker            (int handle, int count, int pxyarray[]);
  1221. extern void    v_rbox                (int handle, int pxyarray[]);
  1222. extern void    v_rfbox                (int handle, int pxyarray[]);
  1223. extern void    vr_recfl                (int handle, int pxyarray[]);
  1224.  
  1225. /*
  1226.  * raster functions
  1227. */
  1228. extern void    v_get_pixel            (int handle, int x, int y, int *pel, int *index);
  1229. extern void    vr_trnfm                (int handle, MFDB *src, MFDB *dst);
  1230. extern void    vro_cpyfm            (int handle, int mode, int pxyarray[], MFDB *src, MFDB *dst);
  1231. extern void    vrt_cpyfm            (int handle, int mode, int pxyarray[], MFDB *src, MFDB *dst, int color[]);
  1232.  
  1233.  
  1234. /*
  1235.  * Some usefull extensions.
  1236. */
  1237. extern void    vdi_array2str        (short *src, char *des, int len);
  1238. extern int    vdi_str2array        (char *src, short *des);
  1239.  
  1240.  
  1241. /*
  1242.  * vdi trap interface
  1243. */
  1244.  
  1245. /* Array sizes in vdi control block */
  1246. #define VDI_CNTRLMAX    15
  1247. #define VDI_INTINMAX  1024
  1248. #define VDI_INTOUTMAX  256
  1249. #define VDI_PTSINMAX      256
  1250. #define VDI_PTSOUTMAX  256
  1251.  
  1252. typedef struct
  1253. {
  1254.     short *control;
  1255.     short *intin;
  1256.     short *ptsin;
  1257.     short *intout;
  1258.     short *ptsout;
  1259. } VDIPB;
  1260.  
  1261. extern short    vdi_intin[], vdi_intout[],    vdi_ptsin[], vdi_ptsout[];
  1262. extern short    vdi_control[];
  1263. extern VDIPB    vdi_params;
  1264.  
  1265. extern void vdi(VDIPB *pb);
  1266.  
  1267. #endif /* VDI */
  1268.  
  1269.  
  1270. #ifdef __cplusplus
  1271. }
  1272. #endif
  1273.  
  1274. #endif
  1275.